home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODF-Interest Archive / May 96 / Re Menu Bar Initialization.1.1 < prev    next >
Encoding:
Internet Message Format  |  1996-12-03  |  1.1 KB  |  [TEXT/ttxt]

  1. Subject:     Re: Menu Bar Initialization
  2. Sent:        5/30/96 12:42 PM
  3. Received:    5/30/96 12:51 PM
  4. From:        Mark Lanett, mlanett@meer.net
  5. Reply-To:    ODF Interest, ODF-Interest@CILabs.ORG
  6. To:          OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
  7.  
  8. >In converting our part to DR5, we have attempted to initialize the menubar
  9. >via resources as is done by the Draw part. When we make the
  10. >call ""GetMenuBar(ev)->InitializeFromResource(ev, kMenuBar);" we get the
  11. >assert "FW_CMenuItem::Read should never have been called").
  12. >Any ideas why?  The following is the stack crawl from the assert.
  13.  
  14. This is a terribly obscure ODFRC bug. Check your Menus.fr file to see if
  15. you have any dangling commas, like so:
  16.  
  17.  
  18. FW_RPullDownMenu {
  19.         "My Menu" {
  20.                 FW_RTextItem (...),
  21.                 FW_RTextItem (...), <-- dangling comma!
  22.         }
  23. }
  24.  
  25. The last item should not have a comma. ODFRC will insert an empty *third*
  26. item here, using the base class for menu items. It is when this third dummy
  27. menu item gets read in that the base C++ class' Read member gets called.
  28.  
  29. Nuke the comma and all will be well.
  30.  
  31.  
  32. Mark Lanett, ODF
  33.  
  34.